using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
using TEngine;
using System;

namespace GameLogic
{
	[Window(UILayer.UI)]
	class Pan_Home : UIWindow
	{
        #region 组件
        private Button m_btnPlay;
        private Button m_btnPlayMathMaster​;
        #endregion

        #region 生命周期
        protected override void BindMemberProperty()
        {
            m_btnPlay = FindChildComponent<Button>("m_btnPlay");
            m_btnPlayMathMaster = FindChildComponent<Button>("m_btnPlayMathMaster​");
        }

        protected override void RegisterEvent()
        {
            m_btnPlay.onClick.AddListener(OnPlay);
            m_btnPlayMathMaster.onClick.AddListener(OnPlayMathMaster);
        }



        protected override void OnRefresh()
        {
            Log.Info("Pan_Home OnRefresh");
        }

        
        

        #endregion

        #region 事件

        private void OnPlay()
        {
            GameModule.UI.ShowUI<Pan_GameZeroSumDrag>();
        }

        private void OnPlayMathMaster()
        {
            GameModule.UI.ShowUI<Pan_GameMath>();
        }
        #endregion

        #region 逻辑

        #endregion

    }
}
